How to Convert VMDK to VHDX disk

If you need make an offline conversion of VMware VMDK disks to Hyper-V’s VHDX disk format, Microsoft have made a free tool for just that.

How to convert VMDK to VHDX

MVMC

Free Tool for vmdk to vhdx conversion

If you are planning to switch from VMware to Microsoft Hyper-V virtualization platform you might want to convert your old VMware machines. For VMware Enterprise solution there is of cause tools for that like: System Center Virtual Machine Manager or 5nineEasyConverter. However, if you are only testing for personal educational purpose you might also want to convert your VMware disks to the new Hyper-v disk format called .vdhx. Microsoft have a free tool for that called Microsoft Virtual Machine Converter and with this tool you can convert your VMware VMDK disk files to Microsoft’s new Hyper-v format. Microsoft Virtual Machine Converter does come with a GUI, but it will not work for offline conversion. We will have to use PowerShell cmdlet’s for that. I know PowerShell can be a bit scary for a lot of people that are not used to use it, but don’t worry. I will guide you through the process step by step below.

 

hyper-v-logo1-620x264

How to convert vmdk to vhdx using PowerShell

Here is a little step-by-step guide on how you do it. If you have multiple disks you need to convert, you can create a little script to convert them all, one by one 🙂

  1. First download and install Microsoft Virtual Machine Converter
  2. Start PowerShell 3.0 or newer as administrator.
  3. Make sure the VMware VM you want to convert is powered off.
  4. Import VMC PowerShell module with this command: Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
  5. Run the conversion cmdlet like this example: ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath F:\HYPER-V\WIN2008\WIN2008.vmdk -DestinationLiteralPath F:\HYPER-V\Temp\
  6. Wait for the progress to complete (it might take a while depending on the size of the disk and performance of your hard drive).
  7. * When the progress is complete you can create a new VM in Hyper-v and add the disk you just converted.
PowerShell_Convert_vmdk
Click to enlarge picture

For more information about the VMC cmdlet type: get-help ConvertTo-MvmcVirtualHardDisk

PowerShell_Convert_vmdk_help
Click to enlarge picture

* When creating a new VM in Hyper-v you might want to create a Generation 1 VM for full compatibility with older operating system more info about Hyper-V Gen 1 Vs Gen2 here.

Comments or questions

If you have any questions about this post, please drop me a comment below.

Related posts

8 Thoughts to “How to Convert VMDK to VHDX disk”

  1. Thanks for the great tutorial.

  2. Hi,
    Did you remove all Checkpoints from converted VM? What OS you have on the converted VM?

    1. Hi
      Yes, I did not have any snapshot/checkpoint before conversion. I have converted both Windows 7, Windows 8 and Windows server 2008.

  3. This looks sophisticated. Is it the same like Oracle Virtual Machine?

    1. Hyper-v is kind of the same as Oracle Virtual Machine. It is a feature you can enable in Windows 10 Pro and Windows 10 Enterprise, It is great if you need to test a new Operating System.

  4. Angellina Lear

    Hi Thomas,
    An impressive and informative information about how to convert VMDK to VHDX disk. Had all but given up on getting an Esxi working with my old hardware, but HyperV likes my network cards just fine. Now I can run the VM on it too.

  5. Juan Almería

    Thank you! Great and very useful post!

    I also tried qemu-img for Windows, and it works perfectly.

    It’s free, portable and it runs under CMD.

    For example, to convert VHDX to VMDK:

    qemu-img.exe convert FileSource-Image.vhdx -O vmdk FileDestination-Image.vmdk

    Extracted from: http://www.sysadmit.com/2016/08/vmware-convertir-vhdx-en-vmdk.html

    1. Thanks for the tip Juan

Leave a Comment